package com.mjk.common.core.jdbc.ibatis.typehandler.handler;



import com.mjk.common.core.jdbc.ibatis.typehandler.BaseHandler;
import com.mjk.common.util.ObjectUtils;

import java.lang.reflect.Field;

public class BooleanHandler implements BaseHandler<Boolean> {

	@Override
	public String resovleToString(Field f,Boolean t) {		
		if(ObjectUtils.isEmpty(t)){
            return null;
		}
		return t.toString();
	}

	@Override
	public Boolean resovleResult(Object o) {
		return Boolean.valueOf(o.toString());
	}

}
